import type {  User } from './../../types/user.d'
import { getProfileApi } from './../../api/system/user'
import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useUserStore = defineStore('bc-user', () => {
  const user = ref<User>()

  const getProfile = async () => {
    const res = await getProfileApi()
    user.value = res.data
  }
  

  return {
    user,
    getProfile
  }
})